


<h1>Listing messages</h1>

<table>
  <thead>
    <tr>
      <th>姓名</th>
      <th>祝福语</th>
      <th></th>
    </tr>
  </thead>

  <tbody>
    <% @messages.each do |message| %>
      <tr>
        <td><%= message.from_user_name %></td>
        <td><%= message.content %></td>
        <td><%= link_to 'Destroy', message, method: :delete, data: { confirm: 'Are you sure?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<br>